package com.liang.lingdong.model.user.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 用户修改密码
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UpdatePasswordDto {

    /**
     * 用户id
     */
    @NotBlank
    private Long businessId;

    /**
     * 旧密码
     */
    @NotBlank
    @Length(max = 20, message = "密码长度不能超过20个字符")
    private String oldPassword;

    /**
     * 新密码
     */
    @NotBlank
    @Length(max = 20, message = "密码长度不能超过20个字符")
    private String newPassword;


    @NotBlank
    @Length(max = 20, message = "密码长度不能超过20个字符")
    private String confirmPassword;
}
